#include "reg52.h" 
#include "LedGroup.h"
#include "GBMors.h"
#include "OutIt.h"
#include "TimeIt.h"
#include "series.h"
#include "DigView.h"
#include "KeyUtil.h"
#include "KeyStateUtil.h"
#include "Key_State.h"         //按键扫描头文件
#include "KeyScaner.h"
#include "BeepUtil.h"
sbit led00 = P2^1;
sbit led55 = P2^2;

/*
u8 duan[] = {0x2A,0x7F,0x2A,0x00,0x7F,0x42,0x4A,0x36};
u8 duan2[] = {0x89,0x08,0x08,0x89,0x89,0x08,0x08,0x89};
u8 smgduan1[17]={0x3f,0x6d,0x7d,0x07,
					0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71,0x06,0x5b,0x4f,0x66};
u8 smgduan2[17]={0x3f,0x06,0x5b,0x39,0x5e,0x79,0x4f,0x66,0x6d,0x7d,0x07,
					0x7f,0x6f,0x77,0x7c,0x71};
u8 smgduan3[17]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,
					0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
u8 smgduan4[17]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,
					0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};
*/


sbit beep=P1^5;	
unsigned char beepPWM = 0;
unsigned char Key_Number = 0; //按键值
			
void main(){
	
	unsigned char keyIndex = 1;
	//while(1){
	//showView(smgduan);
	//}

	//showMou(duan);
	//showMou(duan2);
	//Int0Init();
	//Time0Init(); 
	//SeriesInit();
	//seriesSend(0xff);
	//while(1){
	//}
	
	Timer0Init();
	while(1) {
		beepScanf();
		beep_on();
		if(timeCount == 10) {
			
			unsigned char kv = kscanf();
			
			if(kv == 7) {
				led00 = ~led00;
				SBUF = 0x55;
				beepPWM = ~beepPWM;
			}
			if(kv == 8) {
				led55 = ~led55;
			}
			timeCount = 0;
			
		
		}
		
	}
	
}